package com.tangyuan.model;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description: orders
 * @Author: jeecg-boot
 * @Date:   2024-03-12
 * @Version: V1.0
 */
@Data
@TableName("orders")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
public class Orders implements Serializable {
    private static final long serialVersionUID = 1L;

	/**id*/
	@TableId(type = IdType.AUTO)
    private Integer id;
	/**用户id*/
    private Integer userId;
	/**第三方订单号*/
    private String transactionId;
	/**订单号*/
    private String orderNo;
	/**支付方式*/
    private Integer payType;
	/**支付金额*/
    private BigDecimal payBalance;
    @TableField(exist = false)
    private BigDecimal refundBalance;
	/**商品id*/
    private Integer shopId;
	/**商品名*/
    private String shopName;
	/**商品图片*/
    private String shopImage;
	/**商品数量*/
    private Integer shopNum;
	/**支付时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date payTime;
	/**订单状态*/
    private Integer status;
	/**createTime*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;
	/**updateTime*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
	/**isDelete*/
    @TableLogic
    private Integer isDelete;
}
